home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen…rary 5 (Internal Edition) / Apple R&P Lib Internal v5.0.iso / 6-Developer Demos / Developer Demos-Ed. / Macintosh School® CD-ROM Demo / Macintosh SchoolÆ CD-ROM Demo / background_20347.txt < prev    next >
Text File  |  1990-08-14  |  11KB  |  406 lines

  1. -- background: 20347 from stack: in
  2. -- bmap block id: 20708
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: Student Details tabs
  6. ----- HyperTalk script -----
  7. on openBackground
  8.   global checkLoc1,checkLoc2,checkLoc3,checkLoc4
  9.   global checkLoc5,checkLoc6,checkLoc7,checkLoc8
  10.   put 1 into checkLoc1
  11.   put 1 into checkLoc2
  12.   put 1 into checkLoc3
  13.   put 1 into checkLoc4
  14.   put 1 into checkLoc5
  15.   put 1 into checkLoc6
  16.   put 1 into checkLoc7
  17.   put 1 into checkLoc8
  18. end openBackground
  19.  
  20. on doMenu menuItem
  21.   lock screen
  22.   if menuItem contains "About" then
  23.     resetFields
  24.     restoreMenuBar
  25.     go to card "Student Details" of background "About"
  26.     unlock screen with zoom close
  27.   else if menuItem is "Home" then
  28.     resetFields
  29.     restoreMenuBar
  30.     go home
  31.   else if menuItem contains "Quit" then
  32.     resetFields
  33.     restoreMenuBar false
  34.     go to card "Mac School¬Æ Shell"
  35.     unlock screen with zoom close
  36.   end if
  37. end doMenu
  38.  
  39. on resetFields
  40.   lock screen
  41.   set cursor to watch
  42.   go to first card of this background -- Personal tab
  43.   repeat with fieldNum = 1 to the number of card fields
  44.     put empty into card field fieldNum
  45.   end repeat
  46.   put "P" into card field "First"
  47.   put empty into background field "Name"
  48.   put empty into background field "Grade"
  49.   put empty into background field "Homeroom"
  50.   go to next card -- Contacts tab
  51.   repeat with fieldNum = 1 to the number of card fields
  52.     put empty into card field fieldNum
  53.   end repeat
  54.   go to next card -- Misc. tab
  55.   set icon of button "Group One" to "Md Unchecked Box"
  56.   set icon of button "Group Two" to "Md Unchecked Box"
  57.   set icon of button "Group Three" to "Md Unchecked Box"
  58.   set icon of button "Group Four" to "Md Unchecked Box"
  59.   set icon of button "Group Five" to "Md Unchecked Box"
  60.   set icon of button "Group Six" to "Md Unchecked Box"
  61.   set icon of button "Group Seven" to "Md Unchecked Box"
  62.   set icon of button "Group Eight" to "Md Unchecked Box"
  63.   set icon of button "Group Nine" to "Md Unchecked Box"
  64.   set icon of button "Group Ten" to "Md Unchecked Box"
  65.   repeat with fieldNum = 1 to the number of card fields
  66.     put "NA" into card field fieldNum
  67.   end repeat
  68.   go to next card -- Status tab
  69.   repeat with fieldNum = 1 to the number of card fields
  70.     put empty into card field fieldNum
  71.   end repeat
  72.   go to next card -- Health tab
  73.   repeat with fieldNum = 1 to the number of card fields
  74.     put empty into card field fieldNum
  75.   end repeat
  76.   put "No" into card field "Immunized"
  77.   put "No" into card field "Can treat"
  78.   go to next card -- Comments tab
  79.   put empty into card field 1
  80.   go to next card -- Disc. tab
  81.   repeat with fieldNum = 1 to 7
  82.     put empty into card field fieldNum
  83.   end repeat
  84.   put "None" into card field "Number"
  85.   go to last card of this background -- User tab
  86.   repeat with fieldNum = 1 to the number of card fields
  87.     put empty into card field fieldNum
  88.   end repeat
  89.   unlock screen
  90. end resetFields
  91.  
  92.  
  93.  
  94. -- part 1 (button)
  95. -- low flags: 00
  96. -- high flags: 0000
  97. -- rect: left=26 top=22 right=43 bottom=89
  98. -- title width / last selected line: 0
  99. -- icon id / first selected line: 0 / 0
  100. -- text alignment: 1
  101. -- font id: 0
  102. -- text size: 12
  103. -- style flags: 0
  104. -- line height: 16
  105. -- part name: SD Personal
  106. ----- HyperTalk script -----
  107. on mouseUp
  108.   if short name of this card is not short name of me then
  109.     go to card short name of me
  110.   end if
  111. end mouseUp
  112.  
  113.  
  114. -- part 2 (button)
  115. -- low flags: 00
  116. -- high flags: 0000
  117. -- rect: left=96 top=22 right=43 bottom=161
  118. -- title width / last selected line: 0
  119. -- icon id / first selected line: 0 / 0
  120. -- text alignment: 1
  121. -- font id: 0
  122. -- text size: 12
  123. -- style flags: 0
  124. -- line height: 16
  125. -- part name: SD Contacts
  126. ----- HyperTalk script -----
  127. on mouseUp
  128.   if short name of this card is not short name of me then
  129.     lock screen
  130.     go to card short name of me
  131.     put background field "Name" of first card of this background into background field "Name"
  132.     put background field "Grade" of first card of this background into background field "Grade"
  133.     put background field "Homeroom" of first card of this background into background field "Homeroom"
  134.     unlock screen
  135.     tabKey
  136.   end if
  137. end mouseUp
  138.  
  139.  
  140. -- part 3 (button)
  141. -- low flags: 00
  142. -- high flags: 0000
  143. -- rect: left=168 top=22 right=43 bottom=205
  144. -- title width / last selected line: 0
  145. -- icon id / first selected line: 0 / 0
  146. -- text alignment: 1
  147. -- font id: 0
  148. -- text size: 12
  149. -- style flags: 0
  150. -- line height: 16
  151. -- part name: SD Misc
  152. ----- HyperTalk script -----
  153. on mouseUp
  154.   if short name of this card is not short name of me then
  155.     lock screen
  156.     go to card short name of me
  157.     put background field "Name" of first card of this background into background field "Name"
  158.     put background field "Grade" of first card of this background into background field "Grade"
  159.     put background field "Homeroom" of first card of this background into background field "Homeroom"
  160.     unlock screen
  161.   end if
  162. end mouseUp
  163.  
  164.  
  165. -- part 4 (button)
  166. -- low flags: 00
  167. -- high flags: 0000
  168. -- rect: left=212 top=22 right=43 bottom=263
  169. -- title width / last selected line: 0
  170. -- icon id / first selected line: 0 / 0
  171. -- text alignment: 1
  172. -- font id: 0
  173. -- text size: 12
  174. -- style flags: 0
  175. -- line height: 16
  176. -- part name: SD Status
  177. ----- HyperTalk script -----
  178. on mouseUp
  179.   if short name of this card is not short name of me then
  180.     lock screen
  181.     go to card short name of me
  182.     put background field "Name" of first card of this background into background field "Name"
  183.     put background field "Grade" of first card of this background into background field "Grade"
  184.     put background field "Homeroom" of first card of this background into background field "Homeroom"
  185.     unlock screen
  186.     tabKey
  187.   end if
  188. end mouseUp
  189.  
  190.  
  191. -- part 5 (button)
  192. -- low flags: 00
  193. -- high flags: 0000
  194. -- rect: left=270 top=22 right=43 bottom=319
  195. -- title width / last selected line: 0
  196. -- icon id / first selected line: 0 / 0
  197. -- text alignment: 1
  198. -- font id: 0
  199. -- text size: 12
  200. -- style flags: 0
  201. -- line height: 16
  202. -- part name: SD Health
  203. ----- HyperTalk script -----
  204. on mouseUp
  205.   if short name of this card is not short name of me then
  206.     lock screen
  207.     go to card short name of me
  208.     put background field "Name" of first card of this background into background field "Name"
  209.     put background field "Grade" of first card of this background into background field "Grade"
  210.     put background field "Homeroom" of first card of this background into background field "Homeroom"
  211.     unlock screen
  212.     tabKey
  213.   end if
  214. end mouseUp
  215.  
  216.  
  217. -- part 6 (button)
  218. -- low flags: 00
  219. -- high flags: 0000
  220. -- rect: left=326 top=22 right=43 bottom=401
  221. -- title width / last selected line: 0
  222. -- icon id / first selected line: 0 / 0
  223. -- text alignment: 1
  224. -- font id: 0
  225. -- text size: 12
  226. -- style flags: 0
  227. -- line height: 16
  228. -- part name: SD Comments
  229. ----- HyperTalk script -----
  230. on mouseUp
  231.   if short name of this card is not short name of me then
  232.     lock screen
  233.     go to card short name of me
  234.     put background field "Name" of first card of this background into background field "Name"
  235.     put background field "Grade" of first card of this background into background field "Grade"
  236.     put background field "Homeroom" of first card of this background into background field "Homeroom"
  237.     unlock screen
  238.     tabKey
  239.   end if
  240. end mouseUp
  241.  
  242.  
  243. -- part 7 (button)
  244. -- low flags: 00
  245. -- high flags: 0000
  246. -- rect: left=408 top=22 right=43 bottom=441
  247. -- title width / last selected line: 0
  248. -- icon id / first selected line: 0 / 0
  249. -- text alignment: 1
  250. -- font id: 0
  251. -- text size: 12
  252. -- style flags: 0
  253. -- line height: 16
  254. -- part name: SD Disc
  255. ----- HyperTalk script -----
  256. on mouseUp
  257.   if short name of this card is not short name of me then
  258.     lock screen
  259.     go to card short name of me
  260.     put background field "Name" of first card of this background into background field "Name"
  261.     put background field "Grade" of first card of this background into background field "Grade"
  262.     put background field "Homeroom" of first card of this background into background field "Homeroom"
  263.     click at the loc of button "Infraction1"
  264.     click at the loc of button "Teacher1"
  265.     unlock screen
  266.   end if
  267. end mouseUp
  268.  
  269.  
  270.  
  271. -- part 8 (button)
  272. -- low flags: 00
  273. -- high flags: 0000
  274. -- rect: left=448 top=22 right=43 bottom=485
  275. -- title width / last selected line: 0
  276. -- icon id / first selected line: 0 / 0
  277. -- text alignment: 1
  278. -- font id: 0
  279. -- text size: 12
  280. -- style flags: 0
  281. -- line height: 16
  282. -- part name: SD User
  283. ----- HyperTalk script -----
  284. on mouseUp
  285.   if short name of this card is not short name of me then
  286.     lock screen
  287.     go to card short name of me
  288.     put background field "Name" of first card of this background into background field "Name"
  289.     put background field "Grade" of first card of this background into background field "Grade"
  290.     put background field "Homeroom" of first card of this background into background field "Homeroom"
  291.     unlock screen
  292.     tabKey
  293.   end if
  294. end mouseUp
  295.  
  296.  
  297. -- part 9 (button)
  298. -- low flags: 00
  299. -- high flags: A003
  300. -- rect: left=437 top=285 right=308 bottom=504
  301. -- title width / last selected line: 0
  302. -- icon id / first selected line: 0 / 0
  303. -- text alignment: 1
  304. -- font id: 0
  305. -- text size: 12
  306. -- style flags: 0
  307. -- line height: 16
  308. -- part name: Cancel
  309. ----- HyperTalk script -----
  310. on mouseUp
  311.   pop card
  312. end mouseUp
  313.  
  314.  
  315.  
  316. -- part 10 (button)
  317. -- low flags: 00
  318. -- high flags: A003
  319. -- rect: left=437 top=312 right=335 bottom=504
  320. -- title width / last selected line: 0
  321. -- icon id / first selected line: 0 / 0
  322. -- text alignment: 1
  323. -- font id: 0
  324. -- text size: 12
  325. -- style flags: 0
  326. -- line height: 16
  327. -- part name: Done
  328. ----- HyperTalk script -----
  329. on mouseUp
  330.   lock screen
  331.   resetfields
  332.   pop card
  333.   unlock screen
  334. end mouseUp
  335.  
  336.  
  337.  
  338. -- part 11 (button)
  339. -- low flags: 00
  340. -- high flags: 2000
  341. -- rect: left=10 top=47 right=63 bottom=30
  342. -- title width / last selected line: 0
  343. -- icon id / first selected line: 5054 / 5054
  344. -- text alignment: 1
  345. -- font id: 0
  346. -- text size: 12
  347. -- style flags: 0
  348. -- line height: 16
  349. -- part name: Last Student
  350.  
  351.  
  352. -- part 12 (button)
  353. -- low flags: 00
  354. -- high flags: 2000
  355. -- rect: left=35 top=47 right=63 bottom=55
  356. -- title width / last selected line: 0
  357. -- icon id / first selected line: 5055 / 5055
  358. -- text alignment: 1
  359. -- font id: 0
  360. -- text size: 12
  361. -- style flags: 0
  362. -- line height: 16
  363. -- part name: Next Student
  364.  
  365.  
  366. -- part 13 (field)
  367. -- low flags: 01
  368. -- high flags: 0000
  369. -- rect: left=55 top=47 right=65 bottom=285
  370. -- title width / last selected line: 0
  371. -- icon id / first selected line: 0 / 0
  372. -- text alignment: 0
  373. -- font id: 0
  374. -- text size: 12
  375. -- style flags: 0
  376. -- line height: 16
  377. -- part name: Name
  378.  
  379.  
  380. -- part 14 (field)
  381. -- low flags: 01
  382. -- high flags: 0000
  383. -- rect: left=336 top=47 right=65 bottom=373
  384. -- title width / last selected line: 0
  385. -- icon id / first selected line: 0 / 0
  386. -- text alignment: 0
  387. -- font id: 0
  388. -- text size: 12
  389. -- style flags: 0
  390. -- line height: 16
  391. -- part name: Grade
  392.  
  393.  
  394. -- part 15 (field)
  395. -- low flags: 01
  396. -- high flags: 0000
  397. -- rect: left=453 top=47 right=65 bottom=505
  398. -- title width / last selected line: 0
  399. -- icon id / first selected line: 0 / 0
  400. -- text alignment: 0
  401. -- font id: 0
  402. -- text size: 12
  403. -- style flags: 0
  404. -- line height: 16
  405. -- part name: Homeroom
  406.